/*
 * @Date: 2020-08-27 09:45:09
 */
import { createStore } from 'redux'
// 定义state初始化和修改规则
function counterReducer(state = 0, action) {

  switch (action.type) {
    case 'ADD':
      return state + 1
    case 'DEL':
      return state - 1
    default:
      return state
  }
}

const store = createStore(counterReducer)

export default store
